package com.xysoft.util;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class JsonUtil {
	/**
	 * JSON字符串Array
	 */
	public static String toString(Object obj) {
		JSONArray json = JSONArray.fromObject(obj);
		return json.toString();
	}
	
	/**
	 * JSON字符串Object
	 */
	public static String toStringFromObject(Object obj) {
		JSONObject json = JSONObject.fromObject(obj);
		return json.toString();
	}
}
